<?php 

class IndexController extends Controller
{
	
	public function Index()
	{
		// 链接数据库
		// $stulist = M("stu")->findAll();
		// 
	
		// 实例化模型
		$res = D('stu')->getTopStu();

		var_dump($res);exit;

		// var_dump($stulist);
		// 分配数据
		$this->assgin("title","标题");
		$this->assgin("age",18);
		$this->assgin("stulist",$stulist);
		//渲染视图
		$this->display();
	}

	public function Show()
	{
		echo "首页控制器的show方法";
	}
}






 ?>